package com.cheng.example.geektime.designpatterns.j57.writeventbuself;



/**
 * 通知观察者
 */
public class RegNotificationObserver {

    private RegNotificationService regNotificationService = new RegNotificationService();

    @Subscribe(color = "red")//订阅的意思
    public void handleRegSuccess(String userId) {
        regNotificationService.sendInboxMessage(Long.valueOf(userId), "Welcome...");
    }

    @Subscribe(color = "red")//订阅的意思
    public void handleRegSuccess1(String userId) {
        regNotificationService.sendInboxMessage(Long.valueOf(userId), "Welcome...");
    }
}
